<% promotions = @product.possible_promotions %>

<% if promotions.any? %>
  <div id="promotions">
    <h3 class="pt-4 font-weight-bold text-uppercase product-details-subtitle"><%= Spree.t(:promotions) %></h3>
    <% promotions.each do |promotion| %>
      <div class="row">
        <div class="col-12 col-md-7 col-lg-6 mb-3">
          <div class="card">
            <div class="card-body">
              <h4><%= promotion.name %></h4>
              <p><%= promotion.description %></p>
              <% if promotion.products.any? %>
                <span><%= Spree.t('pdp.products_included_in_promotion') %>:</span>
              <% end %>
            </div>
            <% if promotion.products.any? %>
              <div class="list-group list-group-flush">
                <% promotion.products.each do |product| %>
                  <%= link_to product.name, spree.product_path(product), class: 'list-group-item list-group-item-action' %>
                <% end %>
              </div>
            <% end %>
          </div>
        </div>
      </div>
    <% end %>
  </div>
<% end %>
